home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: jb_chelp.rexx 1.0 (19.3.95) written by Johan Billing
- **
- ** Looks up the word under the cursor using CHelp. CHelp is not loaded
- ** all the time. If you want to have CHelp resident and use the ARexx
- ** interface, you have to modify this macro.
- */
-
- OPTIONS RESULTS
-
- OPTIONS FAILAT 11 /* ignore warnings */
- SIGNAL ON SYNTAX /* ensure clean exit */
- SIGNAL ON FAILURE
- SIGNAL ON BREAK_C /* no label->syntax->exit */
-
- if (LEFT(ADDRESS(), 6) ~= "POLYED") then do
- if SHOW("Ports", "POLYED.1") then
- address 'POLYED.1'
- else do
- say "PolyEd is not running!"
- exit
- end
- end
-
- 'LOCKGUI'
-
- /*----- begin of custom code area --------------------------------------*/
-
- /* You will probably want to change this: */
-
- chelp='dcc:chelp/chelp'
-
- IF ~SHOW(Libraries,'rexxsupport.library') THEN
- IF ~ADDLIB("rexxsupport.library",0,-30,0) THEN EXIT
-
- oldport=address()
-
- 'getword'
- word=result
-
- if word="" then exit
-
- address command chelp '>T:CHelp.tmp' word
- address value oldport
-
- 'UNLOCKGUI' /* affects the active window and must be done here */
-
- 'OPEN FILENAME "T:CHelp.tmp"'
- call delete('T:CHelp.tmp')
-
- /*----- end of custom code area ----------------------------------------*/
-
- 'UNLOCKGUI'
- EXIT
-
- SYNTAX: /* ARexx error... */
-
- say "Error line" SIGL ":" ERRORTEXT(RC) /* report it... */
- 'UNLOCKGUI' /* Unlock GUI! */
- EXIT /* exit */
-
- FAILURE:
- 'UNLOCKGUI' /* Unlock GUI! */
- EXIT /* exit */
-